Generally, two architectural models are currently used in the three-dimensional (3-D) computer graphics industry to send graphics primitives to the graphics hardware. One of the architectural models, commonly referred to as the object coordinate, or modeling coordinate, architectural model (hereinafter “the object coordinate model”) is implemented in computer graphics display systems that are geometry accelerated. In this architectural model, the vertex object coordinates of an application, as well as any optional data, such as normals and colors, are sent directly to the graphics device (e.g., a graphics card) from the host CPU and are completely transformed by the geometry accelerator of the graphics device from object coordinates into device/window coordinates and, optionally, into eye/world coordinates. The geometry accelerator is also responsible for performing perspective projection during the transformation process, as well as for performing additional operations, such as lighting and fog calculations, for example.
The second architectural model is commonly referred to as the window coordinate architectural model (hereinafter “the window coordinate model”). In typical implementations of this architectural model, the vertex object coordinates associated with an application being executed by the host CPU are transformed by a software geometry processing pipeline being executed in the host CPU into window coordinates. The vertex object coordinates are first transformed into eye coordinates, which are then transformed into clip coordinates. Assuming that perspective projection is needed (i.e., assuming that the image being rendered is 3-D) the clip coordinates are then perspective projected into normalized device coordinates. The normalized device coordinates are then transformed into window coordinates. All of these transformations occur within the host CPU.
Once the host CPU has transformed the vertex object coordinates into window coordinates, and has completed any additional processing tasks, such as the tasks of performing lighting and clipping, the window coordinates and any optional vertex data are sent to the graphics hardware. The graphics hardware then performs vector and triangle setup and scan conversion. A known variation of this approach is to also perform vector and/or triangle setup in the host CPU so that the graphics hardware is only required to perform scan conversion.
In the window coordinate model, it is common, in the non-perspective case, for the clip coordinates to correspond directly to the window coordinates. In this case, the system CPU does not have to perform the tasks of perspective projecting the clip coordinates into normalized device coordinates and then of transforming the normalized device coordinates into window coordinates. However, in the perspective case, the clip coordinates must be perspective projected into normalized device coordinates and then the normalized device coordinates must be transformed into window coordinates, which are additional processing steps that typically involve a divide operation and several multiply operations. These are costly processing steps, particularly the perspective division operation, which must be performed by the host CPU prior to sending the window coordinates to the graphics hardware.
In another known implementation of the window coordinate model, the vertex object coordinates are transformed directly into window clip coordinates which are then perspective projected into window coordinates. Although this approach improves the computational efficiency of the transformation pipeline being executed by the host CPU, these transformations still require a significant amount of processing to be performed in the host CPU.
Some computer graphics display systems which implement the window coordinate model comprise graphics hardware which implements a floating-point cell which comprises a general-purpose divider circuit. This divider circuit is used in some of these systems to perform the tasks of vector and triangle setup. It would be advantageous to use this floating-point cell to perform perspective projection in addition to performing vector and triangle setup. However, current implementations of 3-D graphics application program interfaces (APIs), such as, for example, OpenGL™ designed by Silicon Graphics, Inc. and Direct3D™ designed by Microsoft Corporation, used in window coordinate models for performing transformation in the host CPU present window coordinates to the graphics hardware.
Therefore, the current implementations of these types of graphics APIs, among which OpenGL™ and Direct3D™ are currently the most widely used, do not enable the task of perspective projection to be performed within the graphics hardware, but rather, cause these transformation processes to be performed in the host CPU. Consequently, graphics devices currently available on the market are not adapted to perform the task of perspective projection since this task has historically been performed in the host CPU.
A need exists for a computer graphics display system which operates in accordance with the window coordinate architectural model and which allows the task of perspective projection to be performed in the graphics hardware. It would be particularly advantageous to enable the task of perspective projection to be performed in the above-mentioned floating-point cell currently implemented in the graphics hardware of computer graphics display systems currently available on the market. By off-loading the task of perspective projection from the host CPU to the graphics hardware, increased throughput can be realized and processing overhead can be reduced.